import React from 'react';
import { inject, observer} from 'mobx-react';
import allStore from '../../stores';
import {Synergy} from 'weaPortal';
import {WeaTableNew} from 'comsMobx';
const WeaTable = WeaTableNew.WeaTable;
import {
    WeaTop,
    WeaTab,
    WeaLeftRightLayout,
    WeaRightMenu,
    WeaPopoverHrm,
    WeaTools,
    WeaErrorPage,
    WeaDropdown,
    WeaHelpfulTip
} from 'ecCom';
import {Button,Modal,message,Menu, Dropdown, Icon} from 'antd';
import ListLeftTree from './ListLeftTree';
import {Condition,getAdButtons} from './ListCondition';
import FormModifyLog from '../../asyncComps/ModifyLog';
import WfForward from '../../asyncComps/Forward';
import BatchSubmit from '../../asyncComps/BatchSubmit';
import SecondAuthDialog from '../../asyncComps/SecondAuthDialog';
import * as API_LIST from '../../apis/list';
import * as Util from '../../util/listUtil';
import {getSecondAuthConfig4List} from "../../apis/secondAuth";
import {WeaLocaleProvider} from 'ecCom';
import TagTypeSelectDialog from "../../asyncComps/TagTypeSelectDialog";
const getLabel = WeaLocaleProvider.getLabel;
import  OrderBySet from './OrderBySet';
import {toJS} from 'mobx';
import SendSms from '../../asyncComps/SendSms';//新建短信
import SendEmail from '../../asyncComps/SendEmail'; //新建邮件
import * as authTypes from "../../../workflowPublic/constants/secondAuthType";
import {verifySupervise} from "../../util/superviseUtil";
import  '../../util/QYSUkeyUtil';
const { ButtonSelect } = WeaDropdown;

@inject('wfListDoingStore','secondAuthStore')

@observer
class ListDoing extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            top:"",
            left:'',
            btnArr:["批量提交","批量关注"],
            btnSelectedKey:'',
            refreshKey:""
        }
        window.__currentStore = props.wfListDoingStore;
    }
    doInit(props){
        allStore.wfGlobalStore.setCurrentListSymbol('ListDoing');
        const { location,wfListDoingStore } = props;
        wfListDoingStore.setUrlParams(location.query);
        wfListDoingStore.initDatas({method:"all"});
        wfListDoingStore.doSearch({loadDefTab:true});
        _ListenerCtrl.bind();
    }
    componentDidMount() {
        this.doInit(this.props);
        if(window.location.pathname.indexOf('/spa/workflow/index') > -1)
            document.title = this.props.wfListDoingStore.title;
        // const { hover } = this.props.wfListDoingStore
        this.timerID=setTimeout(()=>{ 
            $(".wf_attention_div_btn").on("mouseover mouseout",function(event){
                const str = $(this).attr('id').substr($(this).attr('id').indexOf('_'))
                if(event.type == "mouseover"){  
                 jQuery("#attentionSpan"+str).css("display","block")
                }else if(event.type == "mouseout"){
                 jQuery("#attentionSpan"+str).css("display","none")
                }
               })
         },1000)
    }
    componentDidUpdate(){
        // const { hover } = this.props.wfListDoingStore;
        this.timerID=setTimeout(()=>{ 
            $(".wf_attention_div_btn").on("mouseover mouseout",function(event){
                const str = $(this).attr('id').substr($(this).attr('id').indexOf('_'))
                if(event.type == "mouseover"){  
                 jQuery("#attentionSpan"+str).css("display","block")
                }else if(event.type == "mouseout"){
                 jQuery("#attentionSpan"+str).css("display","none")
                }
               })
         },1000)
      }
    componentWillReceiveProps(nextProps) {
        if(this.props.location.key !== nextProps.location.key) {
            const { wfListDoingStore } = this.props;
            wfListDoingStore.clearStatus();
            this.doInit(nextProps);
            this.setState({refreshKey:new Date()})
        }
    }
    shouldComponentUpdate(nextProps,nextState) {
        return true;
        
    }
    componentWillUnmount(){
        const { wfListDoingStore } = this.props;
        wfListDoingStore.clearStatus();
        _ListenerCtrl.unbind();
        clearTimeout(this.timerID);
    }
    setShowSearchAd=bool=>{this.props.wfListDoingStore.setShowSearchAd(bool)};
    hideSearchAd=()=> this.props.wfListDoingStore.setShowSearchAd(false);
    onSearch=v=>{this.props.wfListDoingStore.doSearch()};
    onSearchChange=v=>{this.props.wfListDoingStore.appendFormFields({requestname:{value:v}})};
    batchSubmitCancel = ()=>{this.props.wfListDoingStore.setShowBatchSubmit(false)};
    varTemp = {
      btns: [],
      rigthBtns: [],
    };
    render() {

        const {wfListDoingStore, secondAuthStore} = this.props;
        const {title,loading,urlParams,tableStore,topTab,topTabCount,searchParams,showSearchAd,showBatchSubmit,form,showSecondAuth,initSecondAuthDialog, showMyOrderBySet, updateShowMyOrberBySet,emailVisible,showBatchSupervisor,fwquery,smsParams,smsVisible,emailVisible_mount,smsVisible_mount} = wfListDoingStore;
        const formParams = form.getFormParams() || {};
        const loadingTable = tableStore.loading;
        const contentDiv = <div style={{height: '100%'}}>
            <WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@n2azci`}
                leftStyle={{paddingRight:300}}
                needCalLsPaddingRight={true}
                buttonsAd={getAdButtons(wfListDoingStore, this.props  && this.props.ecId || '')}
                searchType={['base','advanced']}
                searchsBaseValue={formParams.requestname}
                setShowSearchAd={this.setShowSearchAd}
                hideSearchAd={this.hideSearchAd}
                searchsAd={
                    <Condition ecId={`${this && this.props && this.props.ecId || ''}_Condition@11dghr`} listStore={wfListDoingStore} />
                }
                showSearchAd={showSearchAd}
                datas={topTab}
                selectedKey={searchParams.viewcondition}
                counts={topTabCount}
                onSearch={this.onSearch}
                onSearchChange={this.onSearchChange}
                keyParam="viewcondition"  //主键
                countParam="groupid" //数量
                onChange={this.switchTab}
            />
            <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@gpscn3`} 
                comsWeaTableStore={tableStore}
                rowKey={this.getRowKey}
                register_table={wfListDoingStore.reLoad}
                hasOrder={true}
                needScroll={true}
                //uniqueId={true}--和rowKey重复
                getColumns={this.getColumns}
        />
        </div>;
        const WeaTopContent = urlParams.needTree !== "false" ? 
            <WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@9cntz5`} defaultShowLeft={true}
                leftCom={<ListLeftTree ecId={`${this && this.props && this.props.ecId || ''}_ListLeftTree@6splx8`} listStore={wfListDoingStore} />}
            >{ contentDiv }</WeaLeftRightLayout> : 
            <div>{ contentDiv }</div>;
        this.varTemp.btns = this.varTemp.righhBtns = [];
        this.varTemp.btns = this.getTopButtons();
        this.varTemp.rightBtns = this.getRightMenu();
        let icon = Util.getTopIcon(urlParams);
        let iconBgcolor = Util.getTopIconBgColor(urlParams);
        return (
            <div>
                <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@tbb6xy`} 
                    collectParams={{favname:title, favouritetype:2}}
                    datas={this.varTemp.rightBtns}
                >
                {
                    urlParams.needTop !== "false" ? 
                    <WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@wr97sp`}
                        title={title}
                        loading={loading || loadingTable}
                        icon={icon}
                        iconBgcolor={iconBgcolor}
                        buttons={this.varTemp.btns}
                        buttonSpace={10}
                        showDropIcon={true}
                        dropMenuDatas={this.varTemp.rightBtns}
                    >{ WeaTopContent }</WeaTop> : 
                    <div>{ WeaTopContent }</div>
                }
                </WeaRightMenu>
                {
                    <BatchSubmit ecId={`${this && this.props && this.props.ecId || ''}_BatchSubmit@iykwax`}
                        visible={showBatchSubmit}
                        onSubmit={this.batchSubmitEvent}
                        onCancel={this.batchSubmitCancel}
                    />
                }
  		        {
                    showMyOrderBySet&& <OrderBySet ecId={`${this && this.props && this.props.ecId || ''}_OrderBySet@ivo6ib`} onCancel={updateShowMyOrberBySet } dataKey={tableStore.dataKey}/>
                }
                {
                   initSecondAuthDialog && <SecondAuthDialog ecId={`${this && this.props && this.props.ecId || ''}_SecondAuthDialog@xd2rv5`} visible={showSecondAuth}
                                      wfListDoingStore={wfListDoingStore}
                                      secondAuthStore={secondAuthStore}/>
                }

                <WfForward ecId={`${this && this.props && this.props.ecId || ''}_WfForward@juktjm`} secondAuthStore={secondAuthStore} wfListDoingStore={wfListDoingStore}/>
                <FormModifyLog ecId={`${this && this.props && this.props.ecId || ''}_FormModifyLog@oc2h6h`} />
                <Synergy ecId={`${this && this.props && this.props.ecId || ''}_Synergy@f92fqr`} pathname='/workflow/listDoing' requestid="-1" />
                <TagTypeSelectDialog ecId={`${this && this.props && this.props.ecId || ''}_TagTypeSelectDialog@7z3fry`} curStore={allStore.wfFollowTypeSettingStore} loadCount={wfListDoingStore.reLoad} refresh={wfListDoingStore.doSearch}/>{/*loadCount={wfListDoingStore.initDatas} */}
                <BatchSubmit ecId={`${this && this.props && this.props.ecId || ''}_BatchSubmit@jw67ss`}
                        visible={showBatchSupervisor}
                        onSubmit={this.batchSupervisorEvent}
                        onCancel={this.onCancel}
                        onSubmitText={getLabel(21223,'督办')}
                    />
                {
                    smsVisible_mount && <SendSms ecId={`${this && this.props && this.props.ecId || ''}_SendSms@0ls4kn`} params={mobx.toJS(smsParams)} visible={smsVisible} closeFun={()=>{wfListDoingStore.setSmsVisible(false)}}/>
                }
                {
                    emailVisible_mount && <SendEmail ecId={`${this && this.props && this.props.ecId || ''}_SendEmail@5jt0zx`}  visible={emailVisible} fromCb={true} fwquery={mobx.toJS(fwquery)} closeFun={()=>{wfListDoingStore.setEmailVisible(false)}}/>
                }
            </div>
        )
    }

    onCancel = ()=>{this.props.wfListDoingStore.setShowBatchSupervisor(false)}
    switchTab = (tabKey) => {
        const {wfListDoingStore} = this.props;
        const {topTab} = wfListDoingStore;
        wfListDoingStore.setShowSearchAd(false);
        wfListDoingStore.doSearch({
            viewcondition: tabKey
        });
    }
 
    getTopButtons() {
        const { wfListDoingStore } = this.props;
        const { tableStore,sharearg } = wfListDoingStore;
        const { btnArr,btnSelectedKey } = this.state;
        const selectedLen = tableStore.selectedRowKeysAllPages.length;
        const totalLen = tableStore.count;
        let btns = [];

        if(sharearg.hasBatchReadBtn === "true"){
            btns.push(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@t728i7@batchRead`} type="primary" disabled={totalLen <= 0} onClick={this.batchReadClick}>{getLabel(126957,'全部已读')}</Button>);
        }

        const datas = [
            { key: 'batchSubmit', show: getLabel(17598,'批量提交'),selected: this.state.refreshKey },
            { key: 'batchAttention', show: getLabel(503955,'批量关注')},
            //{ key: 'batchSupervisor',show: getLabel(84561,'批量督办') }
          ];
        btns.push(
            <ButtonSelect ecId={`${this && this.props && this.props.ecId || ''}_ButtonSelect@qgkjfm@batch`} 
                datas={datas} 
                btnProps={{disabled:(selectedLen <= 0 || wfListDoingStore.loading)}}
                dropdownProps={{trigger:['click']}}
                dropBtnProps={{title:getLabel(384039,"点击切换批量操作")}}
                btnOnClick={key => {
                    if(key === 'batchSubmit'){
                        this.batchSubmitClick();
                    }else if(key === 'batchSupervisor'){
                        this.batchSupervisor();
                    }else if(key === 'batchAttention'){
                        this.batchAttention();
                    }
                }} 
                menuOnClick={(key, e) => wfListDoingStore.clickButttonDrop(key) }
            />
        );
        return btns;
    }
    getRightMenu(){
        const { wfListDoingStore } = this.props;
        const { tableStore,sharearg ,updateShowMyOrberBySet,operBtnKey} = wfListDoingStore;
        const selectedLen = tableStore.selectedRowKeysAllPages.length;
        const totalLen = tableStore.count;
    	let btns = [];
    	btns.push({
            key: "search",
    		icon: <i className='icon-workflow-Right-menu--search'/>,
            content:getLabel(197,'搜索'),
            onClick: key =>{
                wfListDoingStore.doSearch();
    		    wfListDoingStore.setShowSearchAd(false);
            }
        });
        if(sharearg.hasBatchSubmitBtn === "true"){
            btns.push({
                key:"batchSubmit",
                icon: <i className='icon-workflow-Right-menu-batch'/>,
                content:getLabel(17598,'批量提交'),
                disabled: operBtnKey !== "batchSubmit" || selectedLen <= 0 || wfListDoingStore.loading,
                onClick: this.batchSubmitClick
            });
        }
        if(sharearg.showBatchAttentionBtn=="true"){
            btns.push({
                key: "batchAttention",
                icon: <i className='icon-coms-Subscribe'/>,
                content: getLabel(503955,'批量关注'),
                disabled: operBtnKey !== "batchAttention" || selectedLen <= 0,
                onClick: this.batchAttention
            });
        }
        
        /*btns.push({
            key: "batchSupervisor",
            icon: <i className='icon-coms-daiban'/>,
            content: getLabel(84561,'批量督办'),
            disabled: operBtnKey !== "batchSupervisor" || selectedLen <= 0,
            onClick: this.batchSupervisor.bind(this)
        });*/
        if(sharearg.hasBatchReadBtn === "true"){
            btns.push({
                key:"batchRead",
                icon: <i className='icon-workflow-Right-menu-Supervise'/>,
                content:getLabel(126957,'全部已读'),
                disabled: totalLen <= 0,
                onClick: this.batchReadClick
            });
        }
    	btns.push({
            key:"colSet",
    		icon: <i className='icon-workflow-Right-menu-Custom'/>,
            content:getLabel(382660,'显示列定制'),
            onClick: key =>{
                tableStore.setColSetVisible(true);
    		    tableStore.tableColSet(true);
            }
    	});
        if(true) {
            btns.push({
                key:"showorder",
                icon: <i className='icon-coms-screen'/>,
                content:getLabel(389339,'默认排序设置'),
                onClick: key =>{
                    updateShowMyOrberBySet(true);
                }
            });
        }
    	return btns;
    }

    batchSupervisorEvent = (remark = '') => {
        const { wfListDoingStore } = this.props;
        const { tableStore } = wfListDoingStore;
        const selectedRowKeys = tableStore.selectedRowKeys;

        let requestids = wfListDoingStore.getSingleRequestid();//点击每一行后面督办按钮的情况

        if(requestids == ''){
           requestids = selectedRowKeys;
        }

        let params = {requestids,remark};
        verifySupervise(requestids,remark,()=> {
            wfListDoingStore.doSupervise(params);
            wfListDoingStore.setShowBatchSupervisor(false);
        });
    }

    //批量督办
    batchSupervisor = () => {
        const { wfListDoingStore } = this.props;
        wfListDoingStore.setShowBatchSupervisor(true,'');
    }

    //批量关注
    batchAttention = () => {
        const { wfListDoingStore } = this.props;
        const { sharearg ,tableStore} = wfListDoingStore;
        const {selectedRowKeysAllPages} = tableStore;
        let idarr = selectedRowKeysAllPages.map(v => {
            const arr = v.split("_");
            const requestid = arr[0];
            return requestid;
        });
        let requestIds = idarr.join(",");
        allStore.wfFollowTypeSettingStore.isSingle = false
        allStore.wfFollowTypeSettingStore.followTypeSelectShow = true
        allStore.wfFollowTypeSettingStore.FollowRequestid = requestIds
        // if(idarr.length==1){
        //     window.followTypeSettingStore.getWorkflowAttentionTypeSet(idarr[0])
        // }else{
        //     window.followTypeSettingStore.getWorkflowAttentionTypeSet()
        // }
    }

    batchReadClick = () => {
        const { wfListDoingStore } = this.props;
        const { tableStore,quickSearchParams,fromQuickSearch } = wfListDoingStore;
		const count = tableStore.count || 0;
		Modal.confirm({
			content: getLabel(386173,'确定要将当前列表全部')+count+getLabel(386174,"条数据都标记为已读吗？"),
			onOk() {
                wfListDoingStore.setLoading(true);
				API_LIST.doReadIt({opertype:"batch", dataKey:tableStore.dataKey,...quickSearchParams,fromQuickSearch:fromQuickSearch}).then(data =>{
                    wfListDoingStore.reLoad({submitReqIds:data.submitReqIds});
                });
			},
			onCancel() {},
		});
    }
    batchSubmitClick = () => {
        const { wfListDoingStore } = this.props;
        const { sharearg } = wfListDoingStore;
		if(sharearg.multisubmitnotinputsign == "1")     //弹窗输入签字意见
            wfListDoingStore.setShowBatchSubmit(true);
		else
			this.batchSubmitEvent("");
    }

    getRowKey =(record,index) =>{
        return `${record.requestid}_${record.userid||""}`;
    }

    getColumns = (columns) => {
        const columnsJS = toJS(columns);
        columnsJS.forEach(col => {
            if(col.dataIndex === "unoperators"){
                const title = (
                    <span>
                        <span title={col.title}>
                            { col.title }
                        </span>
                        {<WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@pwnpfr@${col.dataIndex}`} style={{ marginLeft: 5 }} title={getLabel(516719,"可在【个性化设置】中设置未操作者的显示类型")} placement="top" />}
                    </span>
                    )
                col.title = title;
            }
        });
        return columnsJS;
    }
		

    batchSubmitEvent = (remark) => {
        const {wfListDoingStore, secondAuthStore} = this.props;
        const {tableStore} = wfListDoingStore;
        const {selectedRowKeysAllPages} = tableStore;

        wfListDoingStore.setLoading(true);

        let idarr = selectedRowKeysAllPages.map(v => {
            const arr = v.split("_");
            const requestid = arr[0];
            return requestid;
        });

        let requestIds = idarr.join(",");

        const $this = this;

        const {isAuthSuccess, isProtectSuccess} = secondAuthStore;
        //已验证通过或者已数据保护通过
        if (isAuthSuccess == 1 || isProtectSuccess == 1) {
            const {isEnableAuth, secondAuthType, isEnableProtect, protectType} = secondAuthStore;
            const configParams = secondAuthStore.params;
            const {authKey, qysSignWay = 2} = configParams;

            if (isProtectSuccess != 1 && isEnableProtect == 1) {      //仍然需要数据保护
                if (protectType == authTypes.QYS&&qysSignWay == 2) {     //契约锁数据保护
                    const isProtectDialog = 1;    //1表示打开的是契约锁数据保护的窗口
                    secondAuthStore.setCAAuthData({isProtectDialog});

                    secondAuthStore.setCallbackFunc($this.batchSubmitEvent.bind($this));
                    secondAuthStore.setCallbackParam(remark);

                    //弹出验证或者数据保护的窗口
                    wfListDoingStore.setShowSecondAuth(true);
                    return;
                }
            }

            let params = {};
            params.remark = remark;

            //能运行到这里，说明已经做完了数据保护
            if (isEnableProtect == 1) {
                if (protectType == authTypes.CA_AUTH ||(protectType == authTypes.QYS && qysSignWay == 1)) {
                    params = {...params, authKey, isProtectSuccess};
                }
            }

            //契约锁数据保护或者认证
            if (protectType == authTypes.QYS || secondAuthType == authTypes.QYS) {
                const {params: authParams} = secondAuthStore;
                const {qysSealId, qysSealImg, qysCertDetails} = authParams;
                params = {...params, qysSealId, qysSealImg, qysCertDetails};
            }

            params.protectType = protectType;
            params.secondAuthType = secondAuthType;
            params.isAuthSuccess = isAuthSuccess;
            params.qysSignWay = qysSignWay;

            $this.batchSubmitEvent0(params);
        }else {
            getSecondAuthConfig4List({requestIds}).then(checkResult => {
                const {isEnableAuth = 0, secondAuthType = 0, isEnableProtect = 0, protectType = 0,qysSignWay = 2, message = "", success} = checkResult;

                if (success == "0") {
                    if(!!message){
                        Modal.warning({
                            content: message,
                            okText: getLabel(83446, '确定'),
                            showClose: false
                        })

                        return;
                    }
                }

                secondAuthStore.setDialogData({isEnableAuth, secondAuthType, isEnableProtect, protectType,qysSignWay});
                secondAuthStore.setParams(checkResult);
                if (isEnableAuth == 1) {      //需要二次认证
                    let isProtectDialog = 0;

                    //同时是契约锁认证和数据保护
                    if (secondAuthType == authTypes.QYS &&qysSignWay ==2 && isEnableProtect == 1 && protectType == authTypes.QYS) {
                        isProtectDialog = 10;    //10表示打开的是契约锁二次认证 + 契约锁数据保护的窗口
                    }
                    secondAuthStore.setCAAuthData({isProtectDialog});		//设置认证的数据
                    //弹出验证或者数据保护的窗口
                    secondAuthStore.setCallbackFunc($this.batchSubmitEvent.bind($this));
                    secondAuthStore.setCallbackParam(remark);
                    secondAuthStore.setParams(checkResult);
                    //弹出验证或者数据保护的窗口
                    if(secondAuthType == authTypes.QYS&& qysSignWay== 1){
                        window.QYSUKeyUtil.showSignWin(secondAuthStore);
                    }else {
                        wfListDoingStore.setShowSecondAuth(true);
                    }
                } else {     //没有开启二次认证
                    if (isEnableProtect == 1) {
                        if (protectType == authTypes.QYS&&qysSignWay ==2) {       //契约锁数据保护
                            const isProtectDialog = 1;    //1表示打开的是契约锁数据保护的窗口
                            secondAuthStore.setCAAuthData({isProtectDialog});
                        }

                        //弹出验证或者数据保护的窗口
                        secondAuthStore.setCallbackFunc($this.batchSubmitEvent.bind($this));
                        secondAuthStore.setCallbackParam(remark);
                        secondAuthStore.setParams(checkResult);
                        //弹出验证或者数据保护的窗口
                        wfListDoingStore.setShowSecondAuth(true);
                    } else {     //没有开启数据保护
                        this.batchSubmitEvent0({remark});
                    }
                }

                /* const {isEnableAuth = 0, secondAuthType = 0, authKey = ''} = checkResult;
                 if (isEnableAuth == 1) {      //需要二次验证
                     secondAuthStore.setCallbackFunc(this.batchSubmitEvent0.bind(this));
                     secondAuthStore.setCallbackParam(remark);
                     wfListDoingStore.setSecondAuthType(secondAuthType);
                     wfListDoingStore.setSecondAuthKey(authKey);
                     wfListDoingStore.setShowSecondAuth(true);
                 } else {     //不需要，提交签字意见
                     this.batchSubmitEvent0(remark);
                 }*/
            });
        }
    }

    batchSubmitEvent0(param) {
        const {remark} = param;
        const {wfListDoingStore,secondAuthStore} = this.props;
        const {tableStore} = wfListDoingStore;
        wfListDoingStore.setLoading(true);
        API_LIST.doBatchSubmit(remark, tableStore.selectedRowKeysAllPages, tableStore.datas,param).then(data => {
            wfListDoingStore.reLoad({submitReqIds:data.submitReqIds}, false);
            secondAuthStore.resetStore();
        });
        wfListDoingStore.setShowBatchSubmit(false);
    }
}

export default WeaTools.tryCatch(React, 
    props => <WeaErrorPage ecId={`${this && this.props && this.props.ecId || ''}_WeaErrorPage@hirkia`} msg={ props.error ? props.error : getLabel(383324,' 对不起，该页面异常，请联系管理员 ')+'！'} />,
    {error: ""}
)(ListDoing);


window.WorkflowListDoingUtil = function(routeUrl,id) {
    const timestamp = new Date().getTime();
    const spaUrl = "/spa/workflow/static/index.html?_rdm="+timestamp;
    window.open(spaUrl+"#"+"/main/workflow/continuationProcess?currentRequestid="+id, "");
}

window.WorkflowListDoingUtil =(function(){
    
	return {
        //获取table组件排序条件
		getTableSortParams(){
            const listStore = allStore['wfListDoingStore'];
            const {tableStore} = listStore;
            console.log("tableStore", toJS(tableStore));
            return toJS(tableStore.sortParams);
        }
	}
})()
